%%%%\subsection{Applying Expanding Windows NC to Video Data}
%%%%\label{analysisofsolutions:unequalerrorprotection:applyingexpandingwindows}
%%%%% Discuss the details of applying EW to video data as we have presented
%%%%\fxnote{}
%%%%As discussed, the expanding windows RLNC has been chosen for implementation. Throughout the section this method will be further analysed. Encoding and decoding procedure will be discussed together with a simulation of performance based on the video data characteristics found in Section \ref{analysisofsolutions:videosourcecoding}.

%%%%\subsubsection{Encoding Procedure}
%%%%% Explain how encoding should be done (reference to possible approaches...)
%%%%The encoding procedure follows directly from Equation \eqref{eq:ew:definition} where a subset of the source block is linearly coded with a probabilistic approach. How the layer transmission probabilities, represented by $\Gamma$, are defined directly affects the amount of UEP. For instance $\Gamma_N=1$ represents EEP for the entire generation. In contrast $\Gamma_1=1$ represents EEP for the first importance layer, thus making it impossible to receive the other layers. An UEP compromise must be defined which makes it possible to receive all source packets, but still favouring important data so that receivers with poor channel conditions can receive the most important data.

%%%%\begin{verbatim}
%%%%1: something pseudo encode transmit
%%%%2: something pseudo encode transmit
%%%%3: something pseudo encode transmit
%%%%4: something pseudo encode transmit
%%%%5: something pseudo encode transmit
%%%%6: something pseudo encode transmit
%%%%7: something pseudo encode transmit
%%%%\end{verbatim}

%%%%\subsubsection{Decoding Procedure}
%%%%% Explain how decoding should be done (important!)
%%%%In order to discuss decoding procedure, the case of three layers is assumed. In \eqref{eq:analysisofsolutions:unequalerrorprotection:decoding} it is shown how the different layers form three submatrices within a generation.

%%%%\begin{align} &
%%%%C=\left[
%%%%\begin{array}{l}	
%%%%	\left[\begin{array}{l}
%%%%		\left[\begin{array}{l} \hdots \hdots \\ \hdots \hdots \end{array}\right]^{C_1} \\
%%%%			\begin{array}{l} \hdots \hdots \hdots \hdots \\ \hdots \hdots \hdots \hdots  \end{array} \\
%%%%		%\begin{array}{l} \hdots \hdots \hdots \hdots \hdots \hdots \\ \end{array} \\
%%%%		%\begin{array}{l} \hdots \hdots \hdots \hdots \hdots \hdots \\ \end{array} \\
%%%%	\end{array}\right]^{C_2} \\
%%%%	\begin{array}{l} \hdots \hdots \hdots \hdots \hdots \hdots \\ \end{array} \\
%%%%	\begin{array}{l} \hdots \hdots \hdots \hdots \hdots \hdots \\ \end{array} \\
%%%%\end{array}\right]^{C_3} \label{eq:analysisofsolutions:unequalerrorprotection:decoding}
%%%%\intertext{Where:}
%%%%&\text{$C$ contains the received coding vectors as rows} \notag\\
%%%%&\text{$C_i$ is the sub matrix containing all vectors up to layer $i$} \notag
%%%%\end{align}

%%%%The C matrix is accompanied by a vector with coded symbols, $p$, and the decoding process is described by the following procedure in pseudo code. The notation $p$' means the part of the $p$ vector corresponding to the coding vectors in the $C_i$ sub matrix.

%%%%\begin{verbatim}
%%%%1: for i=max(C_x,x) ; i>1 ; i-- do:
%%%%2:      GE on C_i|p'
%%%%3:      if all symbols in C_i|p' decoded:
%%%%4:             break
%%%%5:      else:
%%%%6:             continue
%%%%\end{verbatim}

















































%%%%%% OLD stuff Emil...


%%%%%%%%%%%%%%\subsubsection{Performance Evaluation in a Test Scenario}
%%%%%%%%%%%%%%% Simulating EWRLNC
%%%%%%%%%%%%%%In order to asses the error protection performance of expanding windows a test scenario is now set up and simulated. The simulation is done through a matlab script\footnote{Running the script with the given parameters in Table \ref{tab:ewrlnc:simulationparameters} takes several hours due to inefficient implementation of finite field computations in matlab.} which can be found on \citep{cd}. The parameters for the simulation is seen in Table \ref{tab:ewrlnc:simulationparameters}.

%%%%%%%%%%%%%%\begin{table}[h] \centering \small
%%%%%%%%%%%%%%\begin{tabular}{c c c c c c c c c}
%%%%%%%%%%%%%%Generation size & q & Layers & L$_1$ & L$_2$ & L$_3$ & $\Gamma_1$ &$\Gamma_2$ & $\Gamma_3$ \\ \hline
%%%%%%%%%%%%%%600 ($\leq$xxx kB) & 256 & 3 & 150 & 225 & 225  & 0.50 & 0.25 & 0.25
%%%%%%%%%%%%%%\end{tabular}
%%%%%%%%%%%%%%\caption{Simulation parameters for EW RLNC performance assesment.}
%%%%%%%%%%%%%%\label{tab:ewrlnc:simulationparameters}
%%%%%%%%%%%%%%\end{table}


%%%%%%%%%%%%%%\begin{figure}[h!]
%%%%%%%%%%%%%%\centering
%%%%%%%%%%%%%%\includegraphics[width=1\textwidth]{figs/ewrlnc_log.eps}
%%%%%%%%%%%%%%\caption{Simulation results for EW RLNC with parameters described in Table \ref{tab:ewrlnc:simulationparameters}.}
%%%%%%%%%%%%%%\label{fig:ewrlnc:simulation}
%%%%%%%%%%%%%%\end{figure}





















